<template>
	<view class="">
		<view class="contbox" v-for="(item,index) in outerarr" :key="index">
			<Basetop :infor="item.text" :state="item.state"></Basetop>
			<view class="hr"></view>
			<view class="details">
				<BaseHouseList :flag="true" @selectCallback="selectCallback" :arr="arr" :type="item.guard_users.type">
				</BaseHouseList>
			</view>

			<view class="hr"></view>


			<view class="delbtn" @click="erweimas(item.id)">
				<view class="del">
					<image src="https://fangguaner.wm76.mtnet.ren/static/applet/ɨһɨ(1).png" mode=""></image>
					<text>扫码核实</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import tkiQrcode from "../../components/tki-qrcode/tki-qrcode.vue"
	import Basetop from "../../components/Basetop/index.vue"
	import BaseHouseList from "../../components/BaseHouseList1/index.vue"
	import {
		gettodaylist
	} from "../../api/api/index.js"
	export default {
		data() {
			return {
				text: {},
				outerarr: [],
				arr: [],
				arr1: [],
				flag: 1
			}
		},
		components: {
			Basetop,
			BaseHouseList
		},
		methods: {
			erweimas(id) {
				this.jumpLink({link:"/pages/erweima/index",query:{id:id}})
			},
			qrR() {},
			selectCallback(item) {

			},
		},
		onLoad() {
			
		},
		onShow() {
			uni.showLoading({
				mask: true,
				title: '加载中'
			})
			gettodaylist().then(res => {
				uni.hideLoading()
				this.outerarr = res.data.map(v => {
					v.text = {
						name: v.guard_users.contact,
						sex: v.guard_users.sex,
						user_phone: v.guard_users.contact_number,
						time: v.time,
						week: v.week,
						update_time: v.update_time
					}
					this.arr = v.guard_hous_id.map(t => {
						t.img = t.image
						t.title = t.name
						t.area = t.building_area
						t.total = t.price
						t.price = t.unit_price
						return t
					})
					return v
				})
			
			})
		},
		// onPullDownRefresh(){
		// 	this.page = 0
		// 	this.isOk = false
		// 	this.outerarr=[]
		// 	this.onShow()
		// }
	}
</script>

<style scoped>
	.contbox {
		background-color: #FFFFFF;
		margin: 10rpx;
		box-shadow: 3rpx 4rpx 7rpx 0rpx rgba(180, 180, 180, 0.46);
		border-radius: 10rpx;
		padding: 42rpx 31rpx 28rpx 26rpx;
		box-sizing: border-box;
	}

	.hr {
		height: 1rpx;
		margin-top: 34rpx;
		background-color: #e0e0e0;
		margin-bottom: 28rpx;
	}



	.delbtn {
		width: 250rpx;
		height: 61rpx;
		background-color: #ffffff;
		border-radius: 31rpx;
		border: solid 3rpx #df4744;
		line-height: 61rpx;
		color: #ce2e2b;
		font-family: MicrosoftYaHei;
		font-size: 26rpx;
		margin-left: 428rpx;
		margin-top: 36rpx;
		text-align: center;
	}

	.del {
		display: flex;
		align-items: center;
		margin-left: 52rpx;
	}

	.delbtn image {
		width: 34rpx;
		height: 34rpx;
		margin-right: 19rpx;
	}

	.more {
		text-align: center;
		font-family: MicrosoftYaHei;
		font-size: 24rpx;
		color: #2f2f2f;
		margin-top: 45rpx;
	}
</style>
